/**
 *      2007-11-10 Duzy Chan<duzy@duzy.info>
 */
#ifndef __GUI_WINDOW_HPP____by_Duzy_Chan__
#define __GUI_WINDOW_HPP____by_Duzy_Chan__ 1

namespace yisc { namespace gui {

  class window;

  typedef window* window_ptr;

  /**!
   *    Common Window interface.
   */
  class window {
  public:
    typedef struct {
      typedef int id_t;
      typedef void* parameter_t;

      id_t id;
      parameter_t parameter1;
      parameter_t parameter2;
    } message_t;

    static window_ptr make_window(); // TODO: use template?
    
    window() {}
    virtual ~window() {}
    
    virtual bool create() = 0;
    virtual void show() = 0;
    virtual void update() = 0;

    virtual bool message_loop() = 0;

  protected:
    virtual bool on_message( message_t& ) = 0;
  };//class window

}//namespace gui
}//namespace yisc

#endif//__GUI_WINDOW_HPP____by_Duzy_Chan__
